/*
* Header file of tedi2html
* Copyright (C) <2022>  <alkeon> [alkeon@autistici.org]
   
* Texdi is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Texdi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with tedi2html.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __TEDI2HTML__
#define __TEDI2HTML__
#include <iostream>
#include <string>
#include "../tedi2lang/tedi2lang.h"
using namespace std;
class tedi2html: public tedi2lang{
	public:
		tedi2html(tags_definition td);
		tedi2html();
		string convert(string text, string header, string footer);
		
		string convert_line_heading(string& line, size_t hash_position);

		string convert_line_list_start(string& line);
		void convert_line_list_item(string& line, size_t li);
		string convert_line_list_end(string& line);
		void convert_line_block(string& line);

		string convert_line_table(string& line, size_t first_pipe);

		string convert_line_ending(string& line);
		string convert_line_control_tags(string& line);

		tags_definition default_tags_value();

		string close_paragraph(bool& is_paragraph);
	private:
		const string _start_paragraph_tag;
		bool _is_paragraph;
};

#endif
